<?php

namespace app\model;

use think\Model;

class History extends Model
{
    //更改默认自动时间戳字段名
    protected $updateTime = 'browsing_time';
    //开启自动时间戳
    protected $autoWriteTimestamp = true;

    //通过recyclables_id 关联到recyclables模型
    public function browsingRecyclables(){
        return $this->belongsTo(Recyclables::class,'recyclables_id','id');
    }
}